package org.rsbot.script;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;
import java.util.List;
import java.util.logging.Logger;

import org.lazygamerz.scripting.api.Camera;
import org.lazygamerz.scripting.api.Combat;
import org.lazygamerz.scripting.api.Equipment;
import org.lazygamerz.scripting.api.Environment;
import org.lazygamerz.scripting.api.GE;
import org.lazygamerz.scripting.api.Game;
import org.lazygamerz.scripting.api.GroundItem;
import org.lazygamerz.scripting.api.Inventory;
import org.lazygamerz.scripting.api.Interface;
import org.lazygamerz.scripting.api.Keyboard;
import org.lazygamerz.scripting.api.Lobby;
import org.lazygamerz.scripting.api.Magic;
import org.lazygamerz.scripting.api.Menu;
import org.lazygamerz.scripting.api.Mouse;
import org.lazygamerz.scripting.api.NPC;
import org.lazygamerz.scripting.api.Nodes;
import org.lazygamerz.scripting.api.Objects;
import org.lazygamerz.scripting.api.Player;
import org.lazygamerz.scripting.api.Prayer;
import org.lazygamerz.scripting.api.Store;
import org.lazygamerz.scripting.api.Screen;
import org.lazygamerz.scripting.api.Settings;
import org.lazygamerz.scripting.api.Summoning;
import org.lazygamerz.scripting.api.Tile;
import org.lazygamerz.scripting.api.Walk;
import org.lazygamerz.scripting.api.WalkerNode;

import org.rsbot.bot.Bot;
import org.rsbot.script.util.Filter;
import org.rsbot.script.wrappers.RSArea;
import org.rsbot.script.wrappers.RSCharacter;
import org.rsbot.script.wrappers.RSInterface;
import org.rsbot.script.wrappers.RSInterfaceChild;
import org.rsbot.script.wrappers.RSItem;
import org.rsbot.script.wrappers.RSItemTile;
import org.rsbot.script.wrappers.RSNPC;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSPlayer;
import org.rsbot.script.wrappers.RSTile;
import org.rsbot.util.ColorUtil;
import org.rsbot.util.StringUtil;

/**
 * Methods that can be used by Infinity scripts.
 * <p/>
 * If you want to edit this methods file from the official Infinity download,
 * then please create an issue at:
 * http://http://code.google.com/p/infinity-client/issues/list
 * 
 * @author This is an open-source project, therefore there are too many to list.
 */
public class Methods implements Constants {

    /**
     * The singleton list.
     */
    public Skills skills = Bot.skills;
    public Bank bank = Bot.bank;
    public Bot bot;
    public Calculations calculate = Bot.calculate;
    public Camera camera = Bot.camera;
    public Combat combat = Bot.combat;
    public Store store = Bot.store;
    public Game game = Bot.game;
    public GrandExchange grandExchange = Bot.grandExchange;
    public Equipment equipment = Bot.equipment;
    public Environment enviro = Bot.enviro;
    public GE ge = Bot.ge;
    public GroundItem ground = Bot.ground;
    public InputManager input = Bot.getInputManager();
    public Inventory inventory = Bot.inventory;
    public Interface iface = Bot.iface;
    public Keyboard keyboard = Bot.keyboard;
    public Lobby lobby = Bot.lobby;
    public Magic magic = Bot.magic;
    public Menu menu = Bot.menu;
    public Mouse mouse = Bot.mouse;
    public NPC npc = Bot.npc;
    public Nodes nodes = Bot.nodes; 
    public Objects objects = Bot.objects;
    public Player player = Bot.player;
    public Prayer prayer = Bot.prayer;
    public Screen screen = Bot.screen;
    public Settings settings = Bot.settings;
    public Summoning summoning = Bot.summoning;
    public Tile tile = Bot.tile;
    public Walk walk = Bot.walk;
    private final java.util.Random random = new java.util.Random();
    protected final Logger log = Logger.getLogger(this.getClass().getName());
    
    


    public void init() {
        this.bank = Bot.bank;
        this.calculate = Bot.calculate;
        this.camera = Bot.camera;
        this.combat = Bot.combat;
        this.game = Bot.game;
        this.grandExchange = Bot.grandExchange;
        this.equipment = Bot.equipment;
        this.enviro = Bot.enviro;
        this.ge = Bot.ge;
        this.ground = Bot.ground;
        this.iface = Bot.iface;
        this.input = Bot.getInputManager();
        this.inventory = Bot.inventory;
        this.keyboard = Bot.keyboard;
        this.lobby = Bot.lobby;
        this.magic = Bot.magic;
        this.menu = Bot.menu;
        this.mouse = Bot.mouse;
        this.npc = Bot.npc;
        this.nodes = Bot.nodes;
        this.objects = Bot.objects;
        this.player = Bot.player;
        this.prayer = Bot.prayer;
        this.skills = Bot.skills;
        this.store = Bot.store;
        this.screen = Bot.screen;
        this.settings = Bot.settings;
        this.summoning = Bot.summoning;
        this.tile = Bot.tile;
        this.walk = Bot.walk;
    }

        protected void log(String message) {
        log.info(message);
    }

        /**
     *              Returns a random double in a specified range
     *
     * @param min   Minimum value (inclusive).
     * @param max   Maximum value (exclusive).
     * @return      The random <code>double</code> generated.
     */
    public double random(double min, double max) {
        return Math.min(min, max) + random.nextDouble() * Math.abs(max - min);
    }

    /**
     *              Returns a random integer in a specified range.
     *
     * @param min   Minimum value (inclusive).
     * @param max   Maximum value (exclusive).
     * @return      The random <code>int</code> generated.
     */
    public int random(int min, int max) {
        int n = Math.abs(max - min);
        return Math.min(min, max) + (n == 0 ? 0 : random.nextInt(n));
    }

    public int random(int min, int max, int sd) {
        int mean = min + (max - min) / 2;
        int rand;
        do {
            rand = (int) (random.nextGaussian() * sd + mean);
        } while (rand < min || rand >= max);
        return rand;
    }

    /**
     *
     * @param min   to sleep in milliseconds
     * @param max   to sleep in milliseconds
     */
    public void sleep(int min, int max) {
        sleep(random(min, max));
    }

    /**
     * @param ms     The time to sleep in milliseconds.
     */
    public void sleep(int ms) {
        try {
            long start = System.currentTimeMillis();
            Thread.sleep(ms);
            long now; // Guarantee minimum sleep
            while (start + ms > (now = System.currentTimeMillis())) {
                Thread.sleep(start + ms - now);
            }
        } catch (InterruptedException ignored) {
        }
    }

    public void stopScript() {
		stopScript(true);
	}

	public void stopScript(boolean logout) {
		log.info("Script stopped.");
		if (bank.isOpen()) {
			bank.close();
		}
		if (game.isLoggedIn() && logout) {
			game.logout();
		}
		Bot.getScriptHandler().stopScript();
	}

    /**
     * Pauses for a specified number of milliseconds. Try not to use this
     * method.
     *
     * @param ms        Time in milliseconds to pause.
     * @see             #waitToMove(int)
     * @see             #waitForAnim(int)
     * @see             #waitForIface(RSInterface, int)
     */
    public void wait(int ms) {
        try {
            long start = System.currentTimeMillis();
            Thread.sleep(ms);
            /* Guarantee minimum sleep */
            long now;
            while (start + ms > (now = System.currentTimeMillis())) {
                Thread.sleep(start + ms - now);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }


    /**
     * @deprecated Use tile1.distanceTo(tile2);
     */
    public int distanceBetween(RSTile t1, RSTile t2) {
        return t1.distanceTo(t2);
    }

    /**
     * @deprecated Use StringUtil.drawLine();
     */
    public static void drawLine(Graphics render, int row, String text) {
        StringUtil.drawLine(render, row, text);
    }

    /**
     * @deprecated use menu.stripFormatting();
     */
    public String stripFomatting(String input) {
        return menu.stripFormatting(input);
    }

    /**
     * @deprecated Use player.animationIs();
     */
    public boolean animationIs(int... ids) {
        return player.animationIs(ids);
    }

    /**
     * @deprecated use menu.arrayContains();
     */
    public boolean arrayContains(String[] items, String search) {
        return menu.arrayContains(items, search);
    }

    /**
     * @deprecated use iface.clickChild();
     */
    public boolean atComponent(RSInterfaceChild child, int id, String act) {
        return iface.clickChild(child, id, false) && atMenu(act);
    }

    /**
     * @deprecated use iface.clickChild();
     */
    public boolean atComponent(RSInterfaceChild com, String act) {
        return iface.clickChild(com, act);
    }

    /**
     * @deprecated use objects.atDoor();
     */
    public boolean atDoor(int id, char direction) {
        return objects.atDoor(id, direction);
    }

    /**
     * @deprecated use tile.clickDoor();
     */
    public boolean atDoorTiles(RSTile t1, RSTile t2) {
        return tile.clickDoor(t1, t2);
    }

    /**
     * @deprecated use menu.action()
     */
    public boolean atDropMenu(final String act) {
        return menu.action(act);
    }

    /**
     * @deprecated use menu.action();
     */
    public boolean atDropMenu(final String act, final String opt) {
        return menu.action(act, opt);
    }

    /**
     * @deprecated use menu.action();
     */
    public boolean atDropMenu(String opt, int col) {
        return menu.action(opt, col);
    }

    /**
     * @deprecated use menu.action();
     */
    public boolean atDropMenuItem(int i, int column) {
        return menu.action(i, column);
    }

    /**
     * @deprecated use equipment.clickItem();
     */
    public boolean atEquippedItem(int id, String act) {
        return equipment.clickItem(id, act);
    }

    /**
     * @deprecated use iface.clickChild();
     */
    public boolean atInterface(int face, int child) {
        return iface.clickChild(face, child);
    }

    /**
     * @deprecated use iface.clickChild();
     */
    public boolean atInterface(int face, int child, String act) {
        return iface.clickChild(face, child);
    }

    /**
     * @deprecated use iface.clickChild();
     */
    public boolean atInterface(RSInterfaceChild child) {
        return iface.clickChild(child);
    }

    /**
     * @deprecated use iface.clickChild();
     */
    public boolean atInterface(RSInterfaceChild child, boolean leftClick) {
        return iface.clickChild(child, leftClick);
    }

    /**
     * @deprecated use iface.clickChild();
     */
    public boolean atInterface(RSInterfaceChild child, String act) {
        return iface.clickChild(child, act);
    }

    /**
     * @deprecated use inventory.clickItem()();
     */
    public boolean atInventoryItem(int id, String opt) {
        return inventory.clickItem(id, opt);

    }

    /**
     * @deprecated use inventory.clickItem();
     */
    public boolean atInventoryItem(RSItem id, String opt) {
        return inventory.clickItem(id, opt);
    }

    /**
     * @deprecated use menu.action();
     */
    public boolean atMenu(String opt) {
        return menu.action(opt);
    }

    /**
     * @deprecated use menu.action();
     */
    public boolean atMenu(String[] i) {
        return menu.action(i);
    }

    /**
     * @deprecated use menu.clickIndex();
     */
    public boolean atMenuItem(int i) {
        return menu.clickIndex(i);
    }

    /**
     * @deprecated Use npc.action();
     */
    public boolean atNPC(RSNPC rsNPC, String opt) {
        return npc.action(rsNPC, opt, false);
    }

    /**
     * @deprecated Use npc.action();
     */
    public boolean atNPC(RSNPC rsNPC, String opt, boolean path) {
        return npc.action(rsNPC, opt, true);
    }

    /**
     * @deprecated Use objects.at();
     */
    public boolean atObject(RSObject object, String act) {
        return objects.at(object, act);
    }

    /**
     * @deprecated Use Player.action();
     */
    public boolean atPlayer(RSCharacter c, String act) {
        return player.action(c, act);
    }

    /**
     * @deprecated use tile.click();
     */
    public boolean atTile(RSTile t, int h, double xd, double yd, String act) {
        return tile.click(t, xd, yd, h, act);
    }

    /**
     * @deprecated use tile.click();
     */
    public boolean atTile(final RSTile t, final double xd, final double yd,
            final int h, final String act, final String opt) {
        return tile.click(t, xd, yd, h, act, opt);
    }

    /**
     * @deprecated use tile.click();
     */
    public boolean atTile(final RSTile t, final String act, final String opt) {
        return tile.click(t, act, opt);
    }

    /**
     * @deprecated use tile.click();
     */
    public boolean atTile(RSTile t, String act) {
        return tile.click(t, act);
    }

    /**
     * @deprecated use tile.click();
     */
    public boolean atTile(RSTile t, String act, boolean path) {
        return tile.click(t, act, path);
    }

    /**
     * @deprecated Use objects.atTree();
     */
    public boolean atTree(RSObject tree, String act) {
        return objects.atTree(tree, act);
    }

    /**
     * @deprecated use magic.autoCastSpell();
     */
    public boolean autoCastSpell(int spell) {
        return magic.autoCastSpell(spell);
    }

    /**
     * @deprecated Use calculate.distance();
     */
    public double calculateDistance(RSTile t, RSTile dest) {
        return calculate.distance(t, dest);
    }

    /**
     * @deprecated Use iface.canContinue();
     */
    public boolean canContinue() {
        return iface.canContinue();
    }

    /**
     * @deprecated Use objects.canReach();
     */
    public boolean canReach(Object obj, boolean can) {
        return objects.canReach(obj, can);
    }

    /**
     * @deprecated use magic.castSpell();
     */
    public boolean castSpell(int id) {
        return magic.castSpell(id);
    }

    /**
     * @deprecated use walk.cleanPath();
     */
    public RSTile[] cleanPath(RSTile[] path) {
        return walk.cleanPath(path);
    }

    /**
     * @deprecated use player.action();
     */
    public boolean clickCharacter(RSCharacter c, String act) {
        return player.action(c, act);
    }

    /**
     * @deprecated Use iface.clickContinue();
     */
    public boolean clickContinue() {
        return iface.clickContinue();
    }

    /**
     * @deprecated Use mouse.click();
     */
    public void clickMouse(boolean leftClick) {
        mouse.click(leftClick);
    }

    /**
     * @deprecated Use mouse.click();
     */
    public void clickMouse(boolean leftClick, int move) {
        mouse.click(leftClick, move);
    }

    /**
     * @deprecated Use mouse.click();
     */
    public void clickMouse(int x, int y, boolean leftClick) {
        mouse.click(x, y, 0, 0, leftClick);
    }

    /**
     * @deprecated Use mouse.click();
     */
    public void clickMouse(int x, int y, int width, int height, boolean leftClick) {
        mouse.click(x, y, width, height, leftClick);
    }

    /**
     * @deprecated Use mouse.click();
     */
    public void clickMouse(int x, int y, int width, int height, boolean leftClick, int move) {
        mouse.click(x, y, width, height, leftClick, move);
    }
    /**
     * @deprecated Use mouse.click();
     */
    public void clickMouse(Point p, boolean leftClick) {
        mouse.click(p.x, p.y, leftClick);
    }

    /**
     * @deprecated Use mouse.click();
     */
    public void clickMouse(Point p, int x2, int y2, boolean leftClick) {
        mouse.click(p.x, p.y, x2, y2, leftClick);
    }

    /**
     * @deprecated Use mouse.click();
     */
    public void clickMouse(Point p, int x2, int y2, boolean leftClick, int move) {
        mouse.click(p, x2, y2, leftClick, move);
    }

    /**
     * @deprecated Use iface.clickChild();
     */
    public boolean clickRSComponent(RSInterfaceChild child, int id, boolean leftclick) {
        return iface.clickChild(child, id, leftclick);
    }

    /**
     * @deprecated Use iface.clickChild();
     */
    public boolean clickRSComponent(RSInterfaceChild com, boolean leftclick) {
        return iface.clickChild(com, leftclick);
    }

    /**
     * @deprecated use iface.click();
     */
    public boolean clickRSComponents(boolean leftclick, RSInterfaceChild... coms) {
        return iface.click(leftclick, coms);
    }

    /**
     * @deprecated Use npc.click();
     */
    public boolean clickRSNPC(RSNPC rsNPC, String act) {
        return npc.click(rsNPC, act, null);
    }

    /**
     * @deprecated Use npc.click();
     */
    public boolean clickRSNPC(RSNPC rsNPC, String act, String name) {
        return npc.click(rsNPC, act, name);
    }

    /**
     * @deprecated use character.distanceTo();
     */
    public int distanceTo(RSCharacter c) {
        return c.distanceTo();
    }

    /**
     * @deprecated use object.distanceTo();
     */
    public int distanceTo(RSObject o) {
        return o.distanceTo();
    }

    /**
     * @deprecated use tile.distanceTo();
     */
    public int distanceTo(RSTile t) {
        return t.distanceTo();
    }

    /**
     * @deprecated use mouse.drag();
     */
    public void dragMouse(int x, int y) {
        mouse.drag(x, y);
    }

    /**
     * @deprecated Use mouse.drag();
     */
    public void dragMouse(Point p) {
        mouse.drag(p.x, p.y);
    }

    /**
     * @deprecated use inventory.dropAllExcept();
     */
    public void dropAllExcept(boolean to, int... ids) {
        inventory.dropAllExcept(to, ids);
    }

    /**
     * @deprecated use inventory.dropAllExcept();
     */
    public boolean dropAllExcept(int... ids) {
        return inventory.dropAllExcept(ids);
    }

    /**
     * @deprecated use inventory.dropItem();
     */
    public void dropItem(int col, int row) {
        inventory.dropItem(col, row);
    }

    /**
     * @deprecated use equipment.contains();
     */
    public boolean equipmentContains(int... ids) {
        return equipment.contains(ids);
    }

    /**
     * @deprecated use equipment.containsOneOf()
     */
    public boolean equipmentContainsOneOf(int... ids) {
        return equipment.containsOneOf(ids);
    }

    /**
     * @deprecated use objects.getNearestByID();
     */
    public RSObject findObject(int... ids) {
        return objects.getNearestByID(ids);
    }

    /**
     * @deprecated use object.getNearestByID();
     */
    public RSObject findObject(int amount, int id) {
        return objects.getNearestByID(id);
    }

    /**
     * @deprecated Use object.getNearestByID();
     */
    public RSObject findObject(int amount, int... ids) {
        return objects.getNearestByID(ids);
    }

    /**
     * @deprecated use objects.getNearestByName();
     */
    public RSObject findObjectByName(String... name) {
        return objects.getNearestByName(name);
    }

    /**
     * @deprecated use walk.findPath();
     */
    private WalkerNode[] findPath(org.lazygamerz.scripting.api.WalkerNode start,
            org.lazygamerz.scripting.api.WalkerNode end) {
        return walk.findPath(start, end);
    }

    /**
     * @deprecated use walk.fixPath(path);
     */
    public RSTile[] fixPath(RSTile[] path) {
        return walk.fixPath(path);
    }

    /**
     * @deprecated use walk.fixPath2(startX, startY, endX, endY);
     */
    public List<RSTile> fixPath2(int startX, int startY, int endX, int endY) {
        return walk.fixPath2(startX, startY, endX, endY);
    }

    /**
     * @deprecated use walk.fixPath2(t);
     */
    public List<RSTile> fixPath2(RSTile t) {
        return walk.fixPath2(t);
    }

    /**
     * @deprecated use walk.fixPath2(t1,t2);
     */
    public List<RSTile> fixPath2(RSTile t1, RSTile t2) {
        return walk.fixPath2(t1,t2);
    }

    /**
     * @deprecated use walk.generateFixedPath(x, y);
     */
    public RSTile[] generateFixedPath(int x, int y) {
        return walk.generateFixedPath(x, y);
    }

    /**
     * @deprecated use walk.generateFixedPath(t);
     */
    public RSTile[] generateFixedPath(RSTile t) {
        return walk.generateFixedPath(t);
    }

    /**
     * @deprecated Use mouse.generatePath();
     */
    public Point[] generateMousePath(int amount, Point end) {
        return mouse.generatePath(amount, end);
    }

    /**
     * @deprecated use walk.generateProperPath(x,  y);
     */
    public RSTile[] generateProperPath(int x, int y) {
        return walk.generateProperPath(x,  y);
    }

    /**
     * @deprecated use walk.generateProperPath(t);
     */
    public RSTile[] generateProperPath(RSTile t) {
        return walk.generateProperPath(t);
    }

    /**
     * @deprecated use ColorUtil.grabColorAt(x, y);
     */
    public Color grabColorAt(int x, int y) {
        return ColorUtil.grabColorAt(x, y);
    }

    /**
     * @deprecated use ColorUtil.findColorInArea();
     */
    public Point[] findColorInArea(Rectangle q, Color desired, Color tolerance) {
        return ColorUtil.findColorInArea(q, desired, tolerance);
    }

    /**
     * @deprecated use iface.isTextInputOpen();
     */
    public boolean isTextInputOpen() {
        return iface.isTextInputOpen();
    }

    /*
     * @deprecated Use game.getAccountName();
     */
    public String getAccountName() {
        return game.getAccountName();
    }

    /**
     * @deprecated use game.getAccountPin();
     */
    public String getAccountPin() {
        return game.getAccountPin();
    }

    /**
     * @deprecated use camera.getCharacterAngle(c);
     */
    public int getAngleToCharacter(RSCharacter c) {
        return camera.getCharacterAngle(c);
    }

    /**
     * @deprecated use camera.getCordsAngle(x2, y2);
     */
    public int getAngleToCoordinates(int x2, int y2) {
        return camera.getCordsAngle(x2, y2);
    }

    /**
     * @deprecated use camera.getObjectAngle();
     */
    public int getAngleToObject(RSObject o) {
        return camera.getObjectAngle(o);
    }

    /**
     * @deprecated use camera.getTileAngle(t);
     */
    public int getAngleToTile(RSTile t) {
        return camera.getTileAngle(t);
    }

    /**
     * @deprecated use camera.getAngle();
     */
    public int getCameraAngle() {
        return camera.getAngle();
    }

    /**
     * @deprecated Use iface.getChild();
     */
    public RSInterfaceChild getChildInterface(int index, int child) {
        return iface.getChild(index, child);
    }

    /**
     * @deprecated use game.getClient();
     */
    public org.rsbot.client.Client getClient() {
        return game.client();
    }

    /**
     * @deprecated use tile.getClosestOnMap();
     */
    public RSTile getClosestTileOnMap(RSTile t) {
        return tile.getClosestOnMap(t);
    }

    /**
     * @deprecated use getContinueChild();
     */
    public RSInterfaceChild getContinueChildInterface() {
        return iface.getContinueChild();
    }

    /**
     * @deprecated use getContinue();
     */
    public RSInterface getContinueInterface() {
        return iface.getContinue();
    }

    /**
     * @deprecateduse game.getCurrentTab();
     */
    public int getCurrentTab() {
        return game.getCurrentTab();
    }

    /**
     * @deprecated use tile.getDestination();
     */
    public RSTile getDestination() {
        return tile.getDestination();
    }

    /**
     * @deprecated use player.getMyEnergy();
     */
    public int getEnergy() {
        return player.getMyEnergy();
    }

    /**
     * @deprecated use equipment.getArray();
     */
    public RSItem[] getEquipmentArray() {
        return equipment.getArray();
    }

    /**
     * @deprecated use equipment.getCount();
     */
    public int getEquipmentCount() {
        return 11 - getEquipmentCount(-1);
    }

    /**
     * @deprecated use equipment.getCount();
     */
    public int getEquipmentCount(int id) {
        return equipment.getCount(id);
    }

    /**
     * @deprecated use equipment.getInterface();
     */
    public RSInterface getEquipmentInterface() {
        return equipment.getInterface();
    }

    /**
     * @deprecated use equipment.getStackArray();
     */
    public int[] getEquipmentStackArray() {
        return equipment.getStackArray();
    }

    /**
     * @deprecated use combat.getFightMode();
     */
    public int getFightMode() {
        return combat.getFightMode();
    }

    /**
     * @deprecated use ground.getItem();
     */
    public RSItemTile getGroundItem(int amount) {
        return ground.getItem(amount);
    }

    /**
     * @deprecated use ground.getItemArray();
     */
    public RSItemTile[] getGroundItemArray(int amount) {
        return ground.getItemArray(amount);
    }

    /**
     * @deprecated use ground.getItemByID();
     */
    public RSItemTile getGroundItemByID(int id) {
        return ground.getItemByID(id);
    }

    /**
     * @deprecated use ground.getItemByID();
     */
    public RSItemTile getGroundItemByID(int amount, int id) {
        return ground.getItemByID(amount, id);
    }

    /**
     * @deprecated use ground.getItemByID();
     */
    public RSItemTile getGroundItemByID(int amount, int[] ids) {
        return ground.getItemByID(amount, ids);
    }

    /**
     * @deprecated use ground.getItemByID(ids);
     */
    public RSItemTile getGroundItemByID(int[] ids) {
        return ground.getItemByID(ids);
    }

    /**
     * @deprecated use ground.getItemsAt();
     */
    public RSItemTile[] getGroundItemsAt(int x, int y) {
        return ground.getItemsAt(x, y);
    }

    /**
     * @deprecated use ground.getItemsAt();
     */
    public RSItemTile[] getGroundItemsAt(RSTile t) {
        return ground.getItemsAt(t.getX(), t.getY());
    }

    /**
     * @deprecated use game.getIDToName()
     */
    public String getIDtoName(int... ids) {
        return game.getIDToName(ids);
    }

    /**
     * @deprecated use iface.get();
     */
    public RSInterface getInterface(int id) {
        return iface.get(id);
    }

    /**
     * @deprecated use iface.getChild();
     */
    public RSInterfaceChild getInterface(int index, int child) {
        return iface.getChild(index, child);
    }

    /**
     * @deprecated use iface.getContaingText
     */
    public RSInterface[] getInterfacesContainingText(String text) {
        return iface.getContainingText(text);
    }

    /**
     * @deprecated use game.getEnforceTabFocus();
     */
    public void setEnforceTabFocus(boolean force) {
        game.setEnforceTabFocus(force);
    }

    /**
     * @deprecated use inventory.getArray();
     */
    public int[] getInventoryArray() {
        return inventory.getArray();
    }

    /**
     * @deprecated use inventory.getCount();
     */
    public int getInventoryCount() {
        return inventory.getCount();
    }

    /**
     * @deprecated use inventory.getCount(stacks);
     */
    public int getInventoryCount(boolean stacks) {
        return inventory.getCount(stacks);
    }

    /**
     * @deprecated use inventory.getCount(ids);
     */
    public int getInventoryCount(int... ids) {
        return inventory.getCount(ids);
    }

    /**
     * @deprecated use inventory.getCount();
     */
    public int getInventoryCount(final boolean stacks, final int... ids) {
        return inventory.getCount(stacks, ids);
    }

    /**
     * @deprecated use inventory.getCountExcept();
     */
    public int getInventoryCountExcept(int... ids) {
        return inventory.getCountExcept(ids);
    }

    /**
     * @deprecated use inventory.getInterface();
     */
    public RSInterfaceChild getInventoryInterface() {
        return inventory.getInterface();
    }

    /**
     * @deprecated use inventory.getItemID();
     */
    public int getInventoryItemIDByName(String name) {
        return inventory.getItemID(name);
    }

    /**
     * @deprecated use inventory.getItemPoint();
     */
    public Point getInventoryItemPoint(int index) {
        return inventory.getItemPoint(index);
    }

    /**
     * @deprecated use inventory.getItems();
     */
    public RSItem[] getInventoryItems() {
        return inventory.getItems();
    }

    /**
     * @deprecated use inventory.getItem();
     */
    public RSItem getInventoryItem(final int... ids) {
        return inventory.getItem(ids);
    }

    /**
     * @deprecated use inventory.getItem();
     */
    public RSItem[] getInventoryItem() {
        return inventory.getItems();
    }

    /**
     * @deprecated use inventory.getItemAt();
     */
    public RSItem getInventoryItemAt(final int index) {
        return inventory.getItemAt(index);
    }

    /**
     * @deprecated use inventory.getArray();
     */
    public int[] getInventoryStackArray() {
        return inventory.getArray();
    }

    /**
     * @deprecated use game.getLastMessage();
     */
    public String getLastMessage() {
        return game.getLastMessage();
    }

    /**
     * @deprecated use player.getLocation();
     */
    public RSTile getLocation() {
        return player.getLocation();
    }

    /**
     * @deprecated use game.getLoginIndex();
     */
    public int getLoginIndex() {
        return game.getLoginIndex();
    }

    /**
     * @deprecated use menu.isDefaultAction(act);
     */
    public boolean isDefaultAction(String act) {
        return menu.isDefaultAction(act);
    }

    /**
     * @deprcated use menu.getActions();
     */
    public String[] getMenuActions() {
        return menu.getActions();
    }

    /**
     * @deprecated use menu.getIndex();
     */
    public int getMenuIndex(String opt) {
        return menu.getIndex(opt);
    }

    /**
     * @deprecated use menu.getIndex()
     */
    public int getMenuIndex(String act, String opt) {
        return menu.getIndex(act, opt);
    }

    /**
     * @deprecated use menu.getItems();
     */
    public String[] getMenuItems() {
        return menu.getItems();
    }

    /**
     * @deprecated use menu.getLocation();
     */
    public Point getMenuLocation() {
        return menu.getLocation();
    }

    /**
     * @deprecated use menu.getOptions();
     */
    public String[] getMenuOptions() {
        return menu.getOptions();
    }

    /**
     * @deprecated use mouse.getLocation
     */
    public Point getMouseLocation() {
        return mouse.getLocation();
    }

    /**
     * @deprecated Use mouse.get.path();
     */
    protected boolean getMousePath() {
        return mouse.getPath();
    }

    /**
     * @deprecated Use mous.getSpeed();
     */
    protected int getMouseSpeed() {
        return mouse.getSpeed();
    }

    /**
     * @deprecated Use player.getMine()
     */
    public RSPlayer getMyPlayer() {
        return player.getMine();
    }

    /**
     * @deprecated use game.getNameToID();
     */
    public int getNametoID(String name) {
        return game.getNameToID(name);
    }

    /**
     * @deprecated Use npc.getNearestFreeByID();
     */
    public RSNPC getNearestFreeNPCByID(int... ids) {
        return npc.getNearestFreeByID(ids);
    }

    /**
     * @deprecated Use npc.getNearestFreeByName();
     */
    public RSNPC getNearestFreeNPCByName(String... names) {
        return npc.getNearestFreeByName(names);
    }

    /**
     * @deprecated Use npc.getNearestFreeToAttackByID();
     */
    public RSNPC getNearestFreeNPCToAttackByID(int... ids) {
        return npc.getNearestFreeToAttackByID(ids);
    }

    /*
     * @deprecated Use npc.getNearestFreeToAttackByName();
     */
    public RSNPC getNearestFreeNPCToAttackByName(String... names) {
        return npc.getNearestFreeToAttackByName(names);
    }

    /**
     * @deprecated use ground.getNearestByID()
     */
    public RSItemTile getNearestGroundItemByID(int... ids) {
        return ground.getNearestItemByID(ids);
    }

    /**
     * @deprecated use ground.getNearestItemInAreaByID();
     */
    public RSItemTile getNearestGroundItemInAreaByID(RSArea search, int... ids) {
        return ground.getNearestItemInAreaByID(search, ids);
    }

    /**
     * @deprecated Use npc.getNearestNPCByID();
     */
    public RSNPC getNearestNPCByID(int... ids) {
        return npc.getNearestByID(ids);
    }

    /**
     * @deprecated Use npc.getNearByFilter();
     */
    public RSNPC getNPCByFilter(final Filter<RSNPC> filter) {
        return npc.getNearByFilter(filter);
    }

    /**
     * @deprecated Use npc.getNearestNPCByName();
     */
    public RSNPC getNearestNPCByName(String... names) {
        return npc.getNearestByName(names);
    }

    /**
     * @deprecated Use npc.getNearestToAttackByID();
     */
    public RSNPC getNearestNPCToAttackByID(int... ids) {
        return npc.getNearestToAttackByID(ids);
    }

    /**
     * @deprecated Use npc.getNearestToAttackByName();
     */
    public RSNPC getNearestNPCToAttackByName(String... names) {
        return npc.getNearestToAttackByName(names);
    }

    /**
     * @deprecated Use objects.getNearestByID();
     */
    public RSObject getNearestObjectByID(int... ids) {
        return objects.getNearestByID(ids);
    }

    /**
     * @deprecated Use objects.getNearestByName();
     */
    public RSObject getNearestObjectByName(String... names) {
        return objects.getNearestByName(names);
    }

    /**
     * @deprecated Use player.getNearestByLevel();
     */
    public RSPlayer getNearestPlayerByLevel(int level) {
        return player.getNearestByLevel(level);
    }

    /**
     * @deprecated Use player.getNearestByLevel();
     */
    public RSPlayer getNearestPlayerByLevel(int min, int max) {
        return player.getNearestByLevel(min, max);
    }

    /**
     * @deprecated Use player.getNearestByName
     */
    public RSPlayer getNearestPlayerByName(String name) {
        return player.getByName(name);
    }

    /*8
     * @deprecated Use npc.getArray();
     */
    public RSNPC[] getNPCArray(boolean interacting) {
        return npc.getArray(interacting);
    }

    /**
     * @deprecated use getObejctsAt or getTopObjectAt instead
     */
    public RSObject getObjectAt(int x, int y) {
        return getTopObjectAt(x, y);
    }

    /**
     * @deprecated use getObejctsAt or getTopObjectAt instead
     */
    public RSObject getObjectAt(final RSTile t) {
        return getTopObjectAt(t);
    }

    /**
     * @deprecated use objects.getTopAt
     */
    public RSObject getTopObjectAt(int x, int y) {
        return objects.getTopAt(x, y);
    }

    /**
     * @deprecated use objects.getTopAt
     */
    public RSObject getTopObjectAt(final RSTile t) {
        return objects.getTopAt(t);
    }

    /**
     * @deprecated use objects.getAt
     */
    public RSObject[] getObjectsAt(int x, int y) {
        return objects.getAt(x, y);
    }

    /**
     * @deprecated use object.getAt
     */
    public RSObject[] getObjectsAt(RSTile t) {
        return objects.getAt(t);
    }

    /**
     * @deprecated use game.getPlane();
     */
    public int getPlane() {
        return game.getPlane();
    }

    /**
     * @deprecated Use mouse.getRandomX();
     */
    public int getRandomMouseX(int max) {
        return mouse.getRandomX(max);
    }

    /**
     * @deprecated Use.mouse.getRandomY();
     */
    public int getRandomMouseY(int max) {
        return mouse.getRandomY(max);
    }

    /**
     * @deprecated use objects.getRealDistanceTo();
     */
    public int getRealDistanceTo(RSTile t, boolean obj) {
        return objects.getRealDistanceTo(t, obj);
    }

    /**
     * @deprecated use game.client().isItemSelected();
     */
    public int getSelectedItemID() {
        return game.client().isItemSelected();
    }

    /**
     * @deprecated use game.getSelectedItemName();
     */
    public String getSelectedItemName() {
        return game.getSelectedItemName();
    }

    /**
     * @deprecated use prayer.getSelection();
     */
    public RSInterfaceChild[] getSelectedPrayers() {
        return prayer.getSelection();
    }

    /**
     * @deprecated use prayer.isOn()
     */
    public boolean isPrayerOn(int index) {
        return prayer.isOn(index);
    }
    
    /**
     * @deprecated use game.isRunOn();
     */
    public boolean isRunOn() {
        return game.isRunOn();
    }

    /**
     * @deprecated Use settings.get();
     */
    public int getSetting(int set) {
        return settings.get(set);
    }

    /**
     * @deprecated Use settings.getArray();
     */
    public int[] getSettingArray() {
        return settings.getArray();
    }

    /**
     * @deprecated Use game.getTalkInterface(); 
     */
    public RSInterfaceChild getTalkInterface() {
        return game.getTalkInterface();
    }

    /**
     * @deprecated use tile.getOnScreen();
     */
    public RSTile getTileOnScreen(RSTile t) {
        return tile.getOnScreen(t);
    }

    /**
     * @Deprecated use tile.getUnderMouse();
     */
    public RSTile getTileUnderMouse() {
        return tile.getUnderMouse();
    }

    /**
     * @deprecated USe combat.getWildernessLevel();
     */
    public int getWildernessLevel() {
        return combat.getWildernessLevel();
    }

    /**
     * @deprecated use inventory.contains()
     */
    public boolean inventoryContains(int... ids) {
        return inventory.contains(ids);
    }

    /**
     * @deprecated use inventory.containsOneOf();
     */
    public boolean inventoryContainsOneOf(int... id) {
        return inventory.containsOneOf(id);
    }

    /**
     * @deprecated use inventory.getItemByID();
     */
    public RSItem getInventoryItemByID(int... ids) {
        return inventory.getItemByID(ids);
    }

    /**
     * @deprecated use inventory.dropAllExcept();
     */
    public boolean inventoryEmptyExcept(int... ids) {
        return inventory.dropAllExcept(ids);
    }

    /**
     * @deprecated Use player.isCarringItem();
     */
    public boolean isCarryingItem(int... ids) {
        return player.isCarryingItem(ids);
    }

    /**
     * @deprecated Use player.isIdle();
     */
    public boolean isIdle() {
        return player.isIdle();
    }

    /**
     * @deprecated use inventory.isFull();
     */
    public boolean isInventoryFull() {
        return inventory.isFull();
    }

    /**
     * @deprecated use inventory.isItemSelected();
     */
    public boolean isItemSelected() {
        return inventory.isItemSelected();
    }

    /**
     *@deprecated use inventory.isItemSelected();
     */
    public boolean isItemSelected(int id) {
        return inventory.isItemSelected(id);
    }

    /**
     * @deprecated @see {@link org.lazygamerz.scripting.api.Game#isLoggedIn()}
     */
    public boolean isLoggedIn() {
        return game.isLoggedIn();
    }

    /**
     * @deprecated @see {@link org.lazygamerz.scripting.api.Game#isLoginScreen()}
     */
    public boolean isLoginScreen() {
        return game.isLoginScreen();
    }

    /**
     * @deprecated use menu.isOpen();
     */
    public boolean isMenuOpen() {
        return menu.isOpen();
    }

    /**
     * @rdeprecated use prayer.isRetaliateEnabled();
     */
    public boolean isRetaliateEnabled() {
        return prayer.isRetaliateEnabled();
    }

    /**
     * @deprecated Use player.isRunning();
     */
    public boolean isRunning() {
        return player.isRunning();
    }

    /**
     * @deprecated use game.isWelcomeScreen();
     */
    public boolean isWelcomeScreen() {
        return game.isWelcomeScreen();
    }

    /**
     * @deprecated use walk.loadlinks()
     */
    private void loadLinks() {
        walk.loadLinks();
    }

    /**
     * @deprecated use walk.loadMap();
     */
    private void loadMap() {
        walk.loadMap();
    }

    /**
     * @deprecated use walk.loadNodes();
     */
    private void loadNodes() {
        walk.loadNodes();
    }

    /**
     * @deprecated use game.login();
     */
    public boolean login() {
        return game.login();
    }

    /**
     * @deprecated Use game.isOnLogoutTab();
     */
    public boolean isOnLogoutTab() {
        return game.isOnLogoutTab();
    }
    
    /**
     * @deprecated Use game.logout(); 
     */
    public boolean logout() {
        return game.logout();
    }

    /**
     * @deprecated Use game.clickChatButton();
     */
    public void mouseChatButton(int button, boolean left) {
        game.clickChatButton(button, left);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(int x, int y) {
        mouse.move(mouse.getSpeed(), x, y, 0, 0);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(int x, int y, boolean paths) {
        mouse.move(mouse.getSpeed(), x, y, 0, 0, 0, paths);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(int x, int y, int offset) {
        moveMouse(mouse.getSpeed(), x, y, 0, 0, offset);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(int x, int y, int randX, int randY) {
        mouse.move(mouse.getSpeed(), x, y, randX, randY, 0);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(int speed, int x, int y, int randX, int randY) {
        mouse.move(speed, x, y, randX, randY, 0);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(int speed, int x, int y, int randX, int randY,
            int afterOffset) {
        mouse.move(speed, x, y, randX, randY, afterOffset, mouse.getPath());
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(int speed, int x, int y, int randX, int randY, int afterOffset, boolean mousePaths) {
        mouse.move(speed, x, y, randX, randY, afterOffset, mousePaths);

    }

    /**
     * @deprecated Use.mouse.move();
     */
    public void moveMouse(int Speed, Point p, boolean paths) {
        mouse.move(Speed, p, paths);
    }

    /**
     * @deprecated Use mouse.move()
     */
    public void moveMouse(Point p) {
        mouse.move(p);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(Point p, boolean paths) {
        mouse.move(p, paths);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(Point p, int offset, boolean paths) {
        mouse.move(getMouseSpeed(), p.x, p.y, 0, 0, offset, paths);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(Point p, int randX, int randY) {
        mouse.move(p.x, p.y, randX, randY);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(Point p, int randX, int randY, boolean paths) {
        mouse.move(getMouseSpeed(), p.x, p.y, randX, randY, 0, paths);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouse(Point p, int randX, int randY, int offset) {
        mouse.move(getMouseSpeed(), p.x, p.y, randX, randY, offset);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouseByPath(Point p) {
        mouse.move(p, random(1, 6), 0, 0);
    }

    /**
     * @deprecated Use mouse.move();
     */
    public void moveMouseByPath(Point p, int amount) {
        mouse.move(p, amount, 0, 0);
    }

    /*
     * @deprecated Use mouse.move();
     */
    public void moveMouseByPath(Point p, int randX, int randY) {
        mouse.move(p, random(1, 6), randX, randY);
    }

    /*
     * @deprecated Use mouse.move();
     */
    public void moveMouseByPath(Point p, int amount, int randX, int randY) {
        mouse.move(mouse.generatePath(amount, p), randX, randY);
    }

    /*
     * @deprecated Use mouse.move();
     */
    public void moveMousePath(Point[] path, int randX, int randY) {
            mouse.move(path, randX, randY);
    }
    /*
     * @deprecated Use mouse.moveRandomly();
     */
    public void moveMouseRandomly(int max) {
        mouse.moveRandomly(max);
    }

    /**
     * @deprecated Use mouse.moveSlightly();
     */
    public void moveMouseSlightly() {
        mouse.moveSlightly();
    }

    /**
     * @deprecated use walk.nextTile();
     */
    public RSTile nextTile(RSTile path[]) {
        return walk.nextTile(path);
    }

    /**
     * @deprecated use walk.nextTile();
     */
    public RSTile nextTile(RSTile path[], int max) {
        return walk.nextTile(path, max);
    }

    /**
     * @deprecated use walk.nextTile();
     */
    public RSTile nextTile(RSTile path[], int max, boolean enable) {
        return walk.nextTile(path, max, enable);
    }

    /**
     * @deprecated use tile.click();
     */
    public boolean onTile(RSTile t, String search, String act) {
        return tile.click(t, search, act);
    }

    /**
     * @deprecated Use game.openTab();
     */
    public void openTab(int tab) {
        game.openTab(tab);
    }

    /**
     * @deprecated use player.isCarryingItem();
     */
    public boolean playerHasOneOf(int... ids) {
        return player.isCarryingItem(ids);
    }

    /**
     * @deprecated use calculate.pointOnScreen();
     */
    public boolean pointOnScreen(Point p) {
        return calculate.pointOnScreen(p);
    }

    /**
     * @deprecated use inventory.randomizeItemPoint(p);
     * @param p
     * @return
     */
    public Point randomiseInventoryItemPoint(Point p) {
        return inventory.randomizeItemPoint(p);
    }

    /**
     * @deprecated use walk.randomizePath();
     */
    public RSTile[] randomizePath(RSTile[] path, int X, int Y) {
        return walk.randomizePath(path, X, Y);
    }

    /**
     * @deprecated use walk.randomizeTile();
     */
    public RSTile randomizeTile(RSTile tile, int maxX, int maxY) {
        return walk.randomizeTile(tile, maxX, maxY);
    }

    /**
     * @deprecated use player.rest();
     */
    public boolean rest() {
        return player.rest(100);
    }

    /**
     * @deprecated use player.rest();
     */
    public boolean rest(int amount) {
        return player.rest(amount);
    }

    /**
     * @deprecated use walk.reversePath(r);
     */
    public RSTile[] reversePath(RSTile[] r) {
        return walk.reversePath(r);
    }

    /**
     * @deprecated use keyboard.sendKey();
     */
    public void sendKey(char c) {
        input.sendKey(c);
    }

    /**
     * @deprecated use keyboard.sendText();
     */
    public void sendText(String text, boolean enter) {
        input.sendKeys(text, enter);
    }

    /**
     * @deprecated use game.setAssistMode();
     */
    public boolean setAssistMode(org.lazygamerz.scripting.api.Game.CHAT_MODE mode) {
        return game.setAssistMode(mode);
    }

    /**
     * @deprecated Use camera.setAltitude(); 
     */
    public void setCameraAltitude(boolean setKey) {
        camera.setAltitude(setKey);
    }

    /**
     * @deprecated use camera.setAltitude();
     */
    public boolean setCameraAltitude(double percent) {
        return camera.setAltitude(percent);
    }

    /**
     * @deprecated use camera.setRotation();
     */
    public void setCameraRotation(int degrees) {
        camera.setRotation(degrees);
    }

    /**
     * @deprecated Use game.setClanMode();
     */
    public boolean setClanMode(org.lazygamerz.scripting.api.Game.CHAT_MODE mode) {
        return game.setClanMode(mode);
    }

    /**
     * @deprecated Use camera.setCompass(direction); 
     */
    public void setCompass(char direction) {
        camera.setCompass(direction);
    }

    /**
     * @deprecated Use combat.setFightMode();
     */
    public void setFightMode(int mode) {
        combat.setFightMode(mode);
    }

    /**
     * @deprecated use prayer.set();
     */
    public boolean setPrayer(int pray, boolean enable) {
        return prayer.set(pray, enable);
    }

    /**
     * @deprecated Use game.setPrivateChat();
     */
    public boolean setPrivateChat(org.lazygamerz.scripting.api.Game.CHAT_MODE mode) {
        return game.setPrivateChat(mode);
    }

    /**
     * @deprecated Use game.setPublicChat();
     */
    public boolean setPublicChat(org.lazygamerz.scripting.api.Game.CHAT_MODE mode) {
        return game.setPublicChat(mode);
    }

    /**
     * @deprecated use game.setRun();
     */
    public void setRun(boolean enable) {
        game.setRun(enable);
    }

    /**
     * @deprecated use game.setTradeMode();
     */
    public boolean setTradeMode(org.lazygamerz.scripting.api.Game.CHAT_MODE mode) {
        return game.setTradeMode(mode);
    }

    /**
     * @deprecated use menu.setupListener();
     */
    public void setupListener() {
        menu.setupListener();
    }

    /**
     * @deprecated Use game.showAllChatMessages();
     */
    public void showAllChatMessages() {
        game.showAllChatMessages();
    }

    /**
     * @deprecated use game.showGameChatMessages();
     */
    public void showGameChatMessages() {
        game.showGameChatMessages();
    }

    /**
     * @deprecated Use {@link #stopScript()} instead.
     */
    public void stopAllScripts() {
    }

    /**
     * @deprecated use game.switchWorld()
     */
    public void switchWorld(int world) {
        game.switchWorld(world);
    }

    /**
     * @deprecated use tile.onMap();
     */
    public boolean tileOnMap(RSTile t) {
        return tile.onMap(t);
    }

    /**
     * @deprecated use tile.
     */
    public boolean tileOnScreen(RSTile t) {
        return tile.onScreen(t);
    }

    /**
     * @deprecated
     */
    public Point tileToMinimap(RSTile t) {
        return tile.toMiniMap(t);
    }

    /**
     * @deprecated use camera.turnTo();
     */
    public void turnToCharacter(RSCharacter c) {
        camera.turnTo(c);
    }

    /**
     * @deprecated use camera.turnTo();
     */
    public void turnToCharacter(RSCharacter c, int max) {
        camera.turnTo(c, max);
    }

    /**
     * @deprecated use camera.turnTo();
     */
    public void turnToCoordinates(int x, int y) {
        camera.turnTo(x, y);
    }

    /**
     * @deprecated use camera.turnTo();
     */
    public void turnToCoordinates(int x, int y, int max) {
        camera.turnTo(x, y, max);
    }

    /**
     * @deprecated use camera.turnTo()
     */
    public void turnToObject(RSObject o) {
        camera.turnTo(o);
    }

    /**
     * @deprecated use camera.turnTo();
     */
    public void turnToObject(RSObject o, int max) {
        camera.turnTo(o, max);
    }

    /**
     * @deprecated use camera.turnTo();
     */
    public void turnToTile(RSTile t) {
        camera.turnTo(t);
    }

    /**
     * @deprecated use.camera.turnTo();
     */
    public void turnToTile(RSTile t, int max) {
        camera.turnTo(t, max);
    }

    /**
     * @deprecated use inventory.useItem(item, to);
     */
    public boolean useItem(RSItem item, RSItem to) {
        return inventory.useItem(item, to);
    }

    /**
     * @deprecated use inventory.useItem(item, object);
     */
    public boolean useItem(RSItem item, RSObject Object) {
        return inventory.useItem(item, Object);
    }

    /**
     * @deprecated use player.waitForAnim();
     */
    public int waitForAnim(int ms) {
        return player.waitForAnim(ms);
    }

    /**
     * @deprecated use iface.waitForOpen();
     */
    public boolean waitForIface(RSInterface face, int ms) {
        return iface.waitForOpen(face, ms);
    }
    
    /**
     * @deprecated Use iface.waitforChildOpen();
     */
    public boolean waitForInterface(RSInterfaceChild child, int ms) {
        return iface.waitForChildOpen(child, ms);
    }

    /**
     * @deprecated use player.waitToMove();
     */
    public boolean waitToMove(int ms) {
        return player.waitToMove(ms);
    }

    /**
     * @deprecated use walk.PathMM();
     */
    public boolean walkPathMiniM(RSTile[] path) {
        return walk.pathMM(path);
    }

    /**
     * @deprecated use walk.pathMM();
     */
    public boolean walkPathMiniM(RSTile[] path, int max) {
        return walk.pathMM(path, max);
    }

    /**
     * @deprecated use walk.pathMM();
     */
    public boolean walkPathMiniM(RSTile[] path, int x, int y) {
        return walk.pathMM(path, x, y);
    }

    /**
     * @deprecated use walk.pathMM();
     */
    public boolean walkPathMiniM(RSTile[] path, int max, int x, int y) {
        return walk.pathMM(path, max, x, y);
    }

    /**
     * @deprecated use walk.pathOnScreen();
     */
    public boolean walkPathOnScreen(RSTile[] path) {
        return walk.pathOnScreen(path);
    }

    /**
     * @deprecated use walk.pathOnScreen(path, max);
     */
    public boolean walkPathOnScreen(RSTile[] path, int max) {
        return walk.pathOnScreen(path, max);
    }

    /**
     * @deprecated use walk.tileMM();
     */
    public boolean walkTileMiniM(RSTile t) {
        return walk.tileMM(t);
    }

    /**
     * @deprecated use walk.tileMM();
     */
    public boolean walkTileMiniM(RSTile t, int x, int y) {
        return walk.tileMM(t, x, y);
    }

    /**
     * @deprecated use walk.tileOnScreen();
     */
    public boolean walkTileOnScreen(RSTile t) {
        return walk.tileOnScreen(t);
    }

    /**
     * @deprecated use walk.to();
     */
    public boolean walkTo(RSTile t) {
        return walk.to(t, 2, 2);
    }

    /**
     * @deprecated use walk.to();
     */
    public boolean walkTo(RSTile t, int x, int y) {
        return walk.to(t, x, y);
    }

    /**
     * @deprecated use walk.toClosestTile();
     */
    public boolean walkToClosestTile(RSTile[] t) {
        return walk.toClosestTile(t);
    }

    /**
     * @deprecated use walk.toClosestTile();
     */
    public boolean walkToClosestTile(RSTile[] t, int x, int y) {
        return walk.toClosestTile(t, x, y);
    }

    /**
     * @deprecated use skills.getCurrentLifePoints()
     */
    public int getCurrentLifePoints() {
        return skills.getCurrentLifePoints();
    }

    /**
     * @deprected use skills.getCurrentHitPoints();
     */
    public int getCurrentHitPoints() {
        return skills.getCurrentHitPoints();
    }

    /**
     * @deprecated use inventory.waitForCount();
     */
    public int waitForInventoryCount(int item, int count, int ms) {
        return inventory.waitForCount(item, count, ms);
    }

    /**
     * @deprecated use skills.getHPPercent()
     */
    public double getHPPercent() {
        return skills.getHPPercent();
    }

    /**
     * @deprecated use menu.contains();
     */
    public boolean menuContains(String item) {
        return menu.contains(item);
    }

    /**
     * @deprecated use walk.pathMM();
     */
    public boolean Walk(RSTile[] path) {
        return walk.pathMM(path);
    }
}
